﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lgweb.control.inside.menu
{
    public partial class learning : System.Web.UI.UserControl
    {
        public string TagIndex = "1";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.TagIndex = string.IsNullOrEmpty(Request.QueryString["cate"]) ? "1" : Request.QueryString["cate"];
                SetTagIndex();
            }
        }

        private void SetTagIndex()
        {
            switch (this.TagIndex)
            {
                case "7":
                    this.learning_menu1.Attributes.Add("class", "current");
                    break;
                //case "2":
                //    this.learning_menu2.Attributes.Add("class", "current");
                //    break;
                case "8":
                    this.learning_menu3.Attributes.Add("class", "current");
                    break;
                case "9":
                    this.learning_menu4.Attributes.Add("class", "current");
                    break;
                case "10":
                    this.learning_menu5.Attributes.Add("class", "current");
                    break;
                default:
                    this.learning_menu1.Attributes.Add("class", "current");
                    break;
            }
        }

    }
}